<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      >
    <h:head>
        <title>#{bundle_calltraffic_vi.Title}</title>
        <script>
            function confirmComplete() {
                var answer = confirm("Bạn có chắc chắn muốn xóa bản ghi này?");
                if (answer == true)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        </script>        
    </h:head>
    <h:body> 
        <link type="text/css" rel="stylesheet" href="../css/main.css" />        
        <style type="text/css">
            .ui-widget{font-size:95% !important;}
            .ui-layout-unit-content{background-color: #E5E5E5;border-width: 0px}      
            .ui-widget{border-width: 0px;color: red}
        </style>
        <div align="center" id="bodyForm" >            
            <div style="width: 100%;">
                <p:layoutUnit id="top" position="north" size="auto">
                    <ui:insert name="menu">
                        <ui:include src="../../templates/menu.xhtml"/>
                    </ui:insert>
                </p:layoutUnit>

                <p:layoutUnit id="center" position="center" size="400">
                    <h1 class="headerbar">Báo cáo sản lượng dịch vụ MO</h1>
                    <h:form id="form">
                        <br></br>
                        <p:dialog modal="true" widgetVar="statusDialog" header="Đang tìm kiếm.."   
                                      draggable="false" closable="false">  
                                <p:graphicImage value="../../images/ajax-loader.gif" />  
                        </p:dialog>
                        <p:growl id="messages"/> 
                        <h:panelGrid id="pngmdf" columns="4">
                            <h:outputText value="Từ ngày: "/> <p:calendar pattern="dd-MM-yyyy" showOn="button" value="#{baocaoSLDVMOController.tuNgay}"/>
                            <h:outputText value="Từ ngày: "/> <p:calendar pattern="dd-MM-yyyy" showOn="button" value="#{baocaoSLDVMOController.denNgay}"/>
                            <h:outputText value="Đối tác: "/>
                            <p:selectOneMenu style="width: 175px;" value="#{baocaoSLDVMOController.doitac}">
                                            <f:selectItem itemValue="1" itemLabel="Friend"/>
                                            <f:selectItem itemValue="2" itemLabel="Tiến Anh"/>                                            
                            </p:selectOneMenu>
                            <h:outputText value=""/> <p:commandButton value="Xem" action="#{baocaoSLDVMOController.xem()}" update=":form" onclick="statusDialog.show();" oncomplete="statusDialog.hide();"/>
                        </h:panelGrid>                            
                        <p:dataTable value="#{baocaoSLDVMOController.items}" var="bc" paginator="true" rows="20" 
                                     rowsPerPageTemplate="20,25,30" paginatorPosition="bottom">
                            <p:column headerText="Mã dịch vụ">
                                <h:outputText value="#{bc.maDV eq null ? 'Tổng cộng':bc.maDV}"/>
                            </p:column>
                            <p:column headerText="Mạng">
                                <h:outputText value="#{bc.mang}"/>
                            </p:column>
                            <p:column headerText="Số lượng MO">
                                <h:outputText value="#{bc.maDV eq null ? bc.tongcong:bc.soluong}"/>
                            </p:column>                           
                        </p:dataTable>
                    </h:form>
                </p:layoutUnit>
                <p:layoutUnit id="bottom" position="bottom" size="60">
                    <ui:insert name="footer">
                        <ui:include src="../../templates/footer.xhtml"/>
                    </ui:insert>
                </p:layoutUnit>
            </div>
        </div>
    </h:body>
</html>

